import request from '@/utils/request'

// 查询设备版本列表
export function listDeviceVersion(query) {
  return request({
    url: '/device/deviceVersion/list',
    method: 'get',
    params: query
  })
}

// 查询设备版本详细
export function getDeviceVersion(devMac) {
  return request({
    url: '/device/deviceVersion/' + devMac,
    method: 'get'
  })
}

// 新增设备版本
export function addDeviceVersion(data) {
  return request({
    url: '/device/deviceVersion',
    method: 'post',
    data: data
  })
}

// 修改设备版本
export function updateDeviceVersion(data) {
  return request({
    url: '/device/deviceVersion',
    method: 'put',
    data: data
  })
}

// 删除设备版本
export function delDeviceVersion(devMac) {
  return request({
    url: '/device/deviceVersion/' + devMac,
    method: 'delete'
  })
}

// -----------------------------------------

// 根据条件查询设备信息
export function getDevDetailInfoByCondition(query) {
  return request({
    url: '/deviceInfo/getDevDetailInfoByCondition',
    method: 'get',
    params: query
  })
}

 // 修改设备信息
export function modifyDevInfo(data) {
  return request({
    url: '/deviceInfo/modifyDevInfo',
    method: 'post',
    params: data
  })
}

// 删除设备版本
export function delDevInfo(data) {
  return request({
    url: '/device/deviceVersion',
    method: 'post',
    data: data
  })
}

// 设备信息修改新增上传标定文件，文件上传接口
export function uploadEquipmentCameraFile(data) {
  return request({
    url: "/upload/uploadEquipmentCameraFile",
    method: "post",
    data: data,
  });
}